<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/CityGateway.Objects" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/CityGateway.Objects" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="http://metropoline.zapto.org/CityService.svc?xsd=xsd3" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <xs:complexType name="City">
    <xs:sequence>
      <xs:element minOccurs="0" name="Budget" nillable="true" type="tns:Budget" />
      <xs:element minOccurs="0" name="CityName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="CityStatus" nillable="true" type="tns:CityStatus" />
      <xs:element minOccurs="0" name="Elements" nillable="true" type="tns:ArrayOfCityElement" />
      <xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="Neighboures" nillable="true" type="q1:ArrayOfKeyValueOflongNeighbourEVwlua_SC" />
      <xs:element minOccurs="0" name="UserID" type="xs:long" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="City" nillable="true" type="tns:City" />
  <xs:complexType name="Budget">
    <xs:sequence>
      <xs:element minOccurs="0" name="Commercial" type="xs:int" />
      <xs:element minOccurs="0" name="Education" type="xs:int" />
      <xs:element minOccurs="0" name="Energy" type="xs:int" />
      <xs:element minOccurs="0" name="FireDepartment" type="xs:int" />
      <xs:element minOccurs="0" name="HealthCare" type="xs:int" />
      <xs:element minOccurs="0" name="Industrial" type="xs:int" />
      <xs:element minOccurs="0" name="Police" type="xs:int" />
      <xs:element minOccurs="0" name="Residential" type="xs:int" />
      <xs:element minOccurs="0" name="Spendings" type="xs:int" />
      <xs:element minOccurs="0" name="Transportation" type="xs:int" />
      <xs:element minOccurs="0" name="Waste" type="xs:int" />
      <xs:element minOccurs="0" name="Water" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Budget" nillable="true" type="tns:Budget" />
  <xs:complexType name="CityStatus">
    <xs:sequence>
      <xs:element minOccurs="0" name="Age" type="xs:int" />
      <xs:element xmlns:q2="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="BillsHistory" nillable="true" type="q2:ArrayOfKeyValueOfintint" />
      <xs:element minOccurs="0" name="Cash" type="xs:int" />
      <xs:element minOccurs="0" name="CityDate" type="xs:dateTime" />
      <xs:element minOccurs="0" name="CityScore" nillable="true" type="tns:CityScore" />
      <xs:element minOccurs="0" name="CommercialAvailable" type="xs:int" />
      <xs:element minOccurs="0" name="FlatsAvailable" type="xs:int" />
      <xs:element minOccurs="0" name="ImmigrantsIn" type="xs:int" />
      <xs:element minOccurs="0" name="ImmigrantsOut" type="xs:int" />
      <xs:element minOccurs="0" name="IndustrialAvailable" type="xs:int" />
      <xs:element minOccurs="0" name="JobsAvailable" type="xs:int" />
      <xs:element minOccurs="0" name="JobsNeed" type="xs:int" />
      <xs:element minOccurs="0" name="JobsTotal" type="xs:int" />
      <xs:element minOccurs="0" name="MetropolineCash" type="xs:int" />
      <xs:element minOccurs="0" name="Population" nillable="true" type="tns:Population" />
      <xs:element minOccurs="0" name="ResidentialAvailable" type="xs:int" />
      <xs:element xmlns:q3="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="TaxHistory" nillable="true" type="q3:ArrayOfKeyValueOfintint" />
      <xs:element minOccurs="0" name="XP" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CityStatus" nillable="true" type="tns:CityStatus" />
  <xs:complexType name="CityScore">
    <xs:sequence>
      <xs:element minOccurs="0" name="Education" type="xs:int" />
      <xs:element minOccurs="0" name="Energy" type="xs:int" />
      <xs:element minOccurs="0" name="Health" type="xs:int" />
      <xs:element minOccurs="0" name="Jobs" type="xs:int" />
      <xs:element minOccurs="0" name="Residential" type="xs:int" />
      <xs:element minOccurs="0" name="Security" type="xs:int" />
      <xs:element minOccurs="0" name="Waste" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CityScore" nillable="true" type="tns:CityScore" />
  <xs:complexType name="Population">
    <xs:sequence>
      <xs:element minOccurs="0" name="HealthNeed" type="xs:int" />
      <xs:element minOccurs="0" name="JobsNeed" type="xs:int" />
      <xs:element xmlns:q4="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="PopulationByYears" nillable="true" type="q4:ArrayOfKeyValueOfintint" />
      <xs:element minOccurs="0" name="ProcreationAge" type="xs:int" />
      <xs:element minOccurs="0" name="ResidentialNeed" type="xs:int" />
      <xs:element minOccurs="0" name="Total" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Population" nillable="true" type="tns:Population" />
  <xs:complexType name="ArrayOfCityElement">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="CityElement" nillable="true" type="tns:CityElement" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfCityElement" nillable="true" type="tns:ArrayOfCityElement" />
  <xs:complexType name="CityElement">
    <xs:sequence>
      <xs:element minOccurs="0" name="Capacity" type="xs:int" />
      <xs:element minOccurs="0" name="CityElementDesign" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="ConnectionID" type="xs:long" />
      <xs:element minOccurs="0" name="CreateDate" type="xs:dateTime" />
      <xs:element minOccurs="0" name="CursorType" type="tns:CursorType" />
      <xs:element minOccurs="0" name="ElementOrientation" type="tns:CityElementOrientation" />
      <xs:element minOccurs="0" name="ElementStage" type="tns:CityElementStage" />
      <xs:element minOccurs="0" name="ElementType" type="tns:CityElementType" />
      <xs:element minOccurs="0" name="GridColumn" type="xs:int" />
      <xs:element minOccurs="0" name="GridRow" type="xs:int" />
      <xs:element minOccurs="0" name="IsPopulated" type="xs:boolean" />
      <xs:element minOccurs="0" name="Type" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="UpdateDate" type="xs:dateTime" />
      <xs:element minOccurs="0" name="X" type="xs:double" />
      <xs:element minOccurs="0" name="Y" type="xs:double" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CityElement" nillable="true" type="tns:CityElement" />
  <xs:simpleType name="CursorType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Single" />
      <xs:enumeration value="Double" />
      <xs:enumeration value="DoubleSquare" />
      <xs:enumeration value="TripleSquare" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="CursorType" nillable="true" type="tns:CursorType" />
  <xs:simpleType name="CityElementOrientation">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Horizontal" />
      <xs:enumeration value="Vertical" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="CityElementOrientation" nillable="true" type="tns:CityElementOrientation" />
  <xs:simpleType name="CityElementStage">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Building" />
      <xs:enumeration value="Occupied" />
      <xs:enumeration value="Melfunctioned" />
      <xs:enumeration value="Abandoned" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="CityElementStage" nillable="true" type="tns:CityElementStage" />
  <xs:simpleType name="CityElementType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Road" />
      <xs:enumeration value="Residential" />
      <xs:enumeration value="Commercial" />
      <xs:enumeration value="Industrial" />
      <xs:enumeration value="Education" />
      <xs:enumeration value="HealthCare" />
      <xs:enumeration value="Police" />
      <xs:enumeration value="Energy" />
      <xs:enumeration value="Waste" />
      <xs:enumeration value="PublicProperty" />
      <xs:enumeration value="Empty" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="CityElementType" nillable="true" type="tns:CityElementType" />
  <xs:complexType name="Neighbour">
    <xs:sequence>
      <xs:element minOccurs="0" name="CommercialContracts" nillable="true" type="tns:ArrayOfCommercialContract" />
      <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="NeighbourId" type="xs:long" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Neighbour" nillable="true" type="tns:Neighbour" />
  <xs:complexType name="ArrayOfCommercialContract">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="CommercialContract" nillable="true" type="tns:CommercialContract" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfCommercialContract" nillable="true" type="tns:ArrayOfCommercialContract" />
  <xs:complexType name="CommercialContract">
    <xs:sequence>
      <xs:element minOccurs="0" name="ExpiresAt" type="xs:dateTime" />
      <xs:element minOccurs="0" name="MonthlyQouta" type="xs:int" />
      <xs:element minOccurs="0" name="MonthlyRate" type="xs:int" />
      <xs:element minOccurs="0" name="ServiceType" type="tns:CommercialServices" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CommercialContract" nillable="true" type="tns:CommercialContract" />
  <xs:simpleType name="CommercialServices">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Garbage" />
      <xs:enumeration value="Energy" />
      <xs:enumeration value="Water" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="CommercialServices" nillable="true" type="tns:CommercialServices" />
</xs:schema>